﻿<UserControl x:Class="RentReturn.RentReturnView"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
>
    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="*" />
            <ColumnDefinition Width="*" />
            <ColumnDefinition Width="Auto" />
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>

        <StackPanel Orientation="Horizontal" Grid.Row="0" Grid.Column="0">
            <TextBlock Margin="0,0,5,0">From:</TextBlock>
            <TextBlock Text="{Binding RentalService.StartDate}" />
        </StackPanel>

        <StackPanel Orientation="Horizontal" Grid.Row="0" Grid.Column="1">
            <TextBlock Margin="0,0,5,0">To:</TextBlock>
            <TextBlock Text="{Binding RentalService.EndDate}" />
        </StackPanel>

        <StackPanel Orientation="Horizontal" Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2">
            <TextBlock Margin="0,0,5,0">Resource:</TextBlock>
            <TextBlock Text="{Binding RentalService.Resource.Name}" />
        </StackPanel>

        <StackPanel Orientation="Horizontal" Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="2">
            <RadioButton Margin="0,0,10,0" IsChecked="{Binding ReturnedRuined}">Returned Ruined</RadioButton>
            <RadioButton IsChecked="{Binding ReturnedOK}">Returned OK</RadioButton>
        </StackPanel>

        <Button Grid.Row="0" Grid.Column="2" Grid.RowSpan="3" Margin="10"
                Command="{Binding ConfirmCommand}">Confirm
        </Button>
    </Grid>
</UserControl>
